const app = angular.module('myApp', ['ng.select']);
app.controller('myCtrl', function ($scope) {
    $scope.name = 'World';
    // $scope.carModel = {
    //     selectedCar: []
    // };
    // $scope.cars = [];
    $scope.cars = [{id:1, name: 'Audi'}, {id:2, name: 'BMW'}, {id:3, name: 'Honda'}];
    $scope.selectedCar = [];

    // setTimeout(function () {
    //     $scope.selectedCar = [{id:1, name: 'Audi'}, {id:2, name: 'BMW'}];
    // }, 2000)
    $scope.fruits = [{id: 1, name: 'Apple'}, {id: 2, name: 'Orange'},{id: 3, name: 'Banana'}];
    $scope.selectedFruit = null;

    $scope.selected = function () {
        console.log('selected items are:', $scope.selectedCar)
    }

});